<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- <link rel="stylesheet" href="bootstrap.min.css">
    <script src="jquery.min.js"></script>
    <script src="bootstrap.min.js"></script> -->
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <style type="text/css">
        .carousel-inner > .item > img, .carousel-inner > .item > a > img {
            width: 70%;
            margin: auto;
        }
    </style>
</head>
<body>
    <div class="container">
        <h2>Carousel Options</h2>
        <p>The <strong>interval</strong> option specifies the delay (in milliseconds) between each slide.</p>
        <p>The <strong>pause</strong> option pauses the carousel from going through the slides when the mouse pointer enters the carousel.</p>
        <p>The <strong>wrap</strong> option specifies whether the carousel should go through all slides continuously, or stop at the last slide.</p>
        <div class="carousel slide" id="myCarousel">
            <ol class="carousel-indicators">
                <li class="item1 active"></li>
                <li class="item2"></li>
                <li class="item3"></li>
                <li class="item4"></li>
            </ol>
            
            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <img src="./imgs/img_chania.jpg" alt="Chania" width="460" height="345">
                </div>
                <div class="item">
                    <img src="./imgs/img_chania2.jpg" alt="Chania" width="460" height="345">
                </div>
                <div class="item">
                    <img src="./imgs/img_flower.jpg" alt="Flower" width="460" height="345">
                </div>
                <div class="item">
                    <img src="./imgs/img_flower2.jpg" alt="Flower" width="460" height="345">
                </div>
            </div>

            <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
        </div>
    </div>

    <script src="//ajax.googleapis.bootcss.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        // Active Carousel
        $("#myCarousel").carousel({interval: 500, pause: "hover", wrap: false});
        // Enable Carousel Indicators
        $(".item1").click(function() {
            $("#myCarousel").carousel(0);
        });
        $(".item2").click(function() {
            $("#myCarousel").carousel(1);
        });
        $(".item3").click(function() {
            $("#myCarousel").carousel(2);
        });
        $(".item4").click(function() {
            $("#myCarousel").carousel(3);
        });
        // Enable Carousel Controls
        $(".left").click(function() {
            $("#myCarousel").carousel("prev");
        });
        $(".right").click(function() {
            $("#myCarousel").carousel("next");
        });
    </script>
</body>
</html>
